package com.bestcem.xm.user.service;

import com.bestcem.xm.common.core.domain.web.ServiceResult;
import com.bestcem.xm.user.service.dto.user.WeChatCodeResultDTO;
import com.bestcem.xm.user.service.dto.user.WeChatCodeTokenDTO;
import com.bestcem.xm.user.service.dto.user.WeChatTokenDTO;
import com.bestcem.xm.user.service.dto.wechatwork.WechatWorkUnbindDTO;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 企业微信相关服务
 *
 * @author XiaoYunSong <ys.xiao@idiaoyan.com>
 * @version v1.0
 * @date 2022/7/18 11:43
 */
public interface UserWxWorkService {


    /**
     * 企业微信登陆
     *
     * @param weChatTokenDTO 登陆数据
     * @param response       response
     * @return com.bestcem.xm.util.ServiceResult<java.lang.Object>
     * @author Linzhijian <zhijian.lin@idiaoyan.com>
     * @date 2022/04/01 00:06
     */
    ServiceResult<Object> tokenView(WeChatTokenDTO weChatTokenDTO, HttpServletResponse response);


    /**
     * 企业微信进行公司代号及账户密码登录
     *
     * @param codeToken 登陆信息
     * @param request   request
     * @return com.bestcem.xm.util.ServiceResult<com.bestcem.xm.user.service.dto.user.WeChatCodeResultDTO>
     * @author Linzhijian <zhijian.lin@idiaoyan.com>
     * @date 2022/04/01 16:57
     */
    ServiceResult<WeChatCodeResultDTO> weChatCodeTokenView(WeChatCodeTokenDTO codeToken, HttpServletRequest request);


    /**
     * 企业微信解绑
     *
     * @param userId 用户id
     * @return 解绑的结果
     * @author XiaoYunSong <ys.xiao@idiaoyan.com>
     * @date 2022/7/18 13:49
     */
    ServiceResult<WechatWorkUnbindDTO> unbindUser(String userId);
}
